package cn.u313.model;

import cn.u313.comm.utils.FileUtils;

import java.util.ArrayList;
import java.util.List;

public class Duty {
    static class Info{
        String name;
        String qq;

        public Info(String name, String qq) {
            this.name = name;
            this.qq = qq;
        }
    }
    static List<Info> nameList = new ArrayList<>();
    static int _thisName = 0;
    static {
        nameList.add(new Info("郑身利","2041297003"));
//        nameList.add(new Info("黄宗","1054980699"));
        nameList.add(new Info("刘文涛","1449365113"));
        nameList.add(new Info("刘翔","605274032"));
        nameList.add(new Info("陶博","813006433"));
        nameList.add(new Info("万绍鹏","3081266011"));
        nameList.add(new Info("黄小宇","1445332371"));
        nameList.add(new Info("蔡子龙","605311767"));
    }
    static String path = "C:\\bot_105\\bot_220624\\data\\text.txt" ;


    public static String next() {

        String _this = FileUtils.readLineContent(path,0);
        _thisName = new Integer(_this);
//        YLog.e("第"+(_thisName+1)+"天："+nameList.get(_thisName).name);
        _thisName++;
        if (_thisName > nameList.size()-1) {
            _thisName = 0;
        }
        FileUtils.fileLinesWrite(path,_thisName+"",false);
        return "今天由【 "+nameList.get(_thisName).name+" 】值日哦 [CAT:at,code="+nameList.get(_thisName).qq+"]";
//        return "第"+(_thisName+1)+"天："+nameList.get(_thisName).name+ nameList.get(_thisName).qq;
    }
}
